package cn.walls1717.wallsmall.search.thread;

import lombok.extern.slf4j.Slf4j;

/**
 * 继承Thread类
 * 
 * 继承Thread类实现多线程
 * 
 * @author walls1717
 * @since 2022/11/08 20:10
 **/
@Slf4j
public class ThreadTest1 {

    public static void main(String[] args) {
        log.info("main -> start");
        Thread01 thread01 = new Thread01();
        thread01.start();
        log.info("main -> end");
    }

    public static class Thread01 extends Thread {
        @Override
        public void run() {
            log.info("当前线程id -> {}", Thread.currentThread().getId());
            int i = 10 / 2;
            log.info("运行结果 -> {}", i);
        }
    }
}
